//useLatest 永远返回最新的值，可以避免闭包问题
import { useRef } from 'react'

export const useLatest = (value) => {
    const ref = useRef(value)
    ref.current = value
    return ref
}
//模仿组件创建生命周期
export const useMount = () => {

}
//模仿组件销毁生命周期
export const useUnmount = () => {

}